package Stream;

import java.io.FileInputStream;
import java.io.FileOutputStream;

public class WJFZ {
    public static void main(String[] args) throws Exception{
        FileInputStream fis = new FileInputStream("F:/test.txt");
        FileOutputStream fos = new FileOutputStream("E:/linux jdk");
        byte[] buffer = new byte[1024];
        int res = fis.read(buffer);
        while(res>0){
            fos.write(buffer,0,res);
            res = fis.read(buffer);
        }
        fis.close();
        fos.close();
        System.out.println("复制成功");
    }
}
